1. Field of the Invention
The present invention relates to a communication apparatus that operates synchronized with a master clock, and a control method thereof.
2. Description of the Related Art
Synchronous digital hierarchy/synchronous optical networking (SDH/SONET) communication apparatuses follow a master clock in a station building and all the apparatuses transmit and receive data synchronized with each other, thereby ensuring data quality. Concerning the synchronization of clocks, each of the apparatuses synchronizes with a clock from an external clock supplying apparatus, or according to a synchronous status message (SSM) that indicates the quality level of the clock and is transmitted and received among the communication apparatuses. Thereby, a technique of selecting higher quality clocks is employed such as that described in Japanese Patent Application Laid-Open Publication No. H11-127128.
On the other hand, Ethernet (registered trademark) packet-network communication apparatuses primarily operate using an independent clock source. Recently, for Ethernet, a trend of realizing a synchronized network such as the synchronization of clocks among communication apparatuses and the execution of transmission and reception of an SSM to maintain data quality is occurring and has also suggested in various recommendations such as G.8261 and IEE1588.
A synchronous network of conventional communication apparatuses that are based on the SDH/SONET includes externally synchronized communication apparatuses that operate based on the timings of a master clock from a clock supplying apparatus and line synchronization communication apparatuses that operate based on the line timings from the externally synchronized communication apparatuses. Thereby, the entire SDH/SONET network is synchronized with the same clock source.
The externally synchronized communication apparatuses are connected to both ends of each of the line synchronization communication apparatuses. By forwarding an SSM using S1 byte, each of the line synchronization communication apparatuses selects the higher quality clock from among clocks supplied through plural supply paths. When trouble arises in one of the supply paths, each communication apparatus executes a clock source switching operation to switch the clock synchronizing the clock of the apparatus with a clock from another supply path.
In case the quality levels of the clocks from the supply paths are the same, a network manager determines in advance a preference for each of the supply paths and sets the determined preference in each communication apparatus to determine which communication apparatus will be selected as the clock source. Thus, when the quality levels of the clocks of the supply paths are the same, each communication apparatus automatically selects a clock source based on the preference determined in advance.
However, according to the conventional technique above, if plural communication apparatuses synchronize with a clock supplied from a single supply path and trouble occurs in the supply path, the communication apparatuses need to sequentially switch clock sources such that the communication apparatuses synchronize with a clock supplied from another supply path. Each communication apparatus operates using an internal self-running clock until the communication apparatus completes the switching of its clock source. Therefore, a problem arises in that the quality of the clock is degraded before the completion of the switching.
For example, in a case where the quality levels of the clocks of the supply paths are the same, when a predetermined supply path having a high quality is selected, all the communication apparatuses synchronize with the clock supplied from the predetermined supply path upon the occurrence of trouble. As described above, when numerous communication apparatuses synchronize with the clock supplied from one supply path, the clock-source switching operation of each communication apparatus takes time and the period during which the communication apparatus uses the self-running clock becomes long.